/*
 * Individual.hpp
 *
 *  Created on: 27-12-2010
 *      Author: Przemek
 */

#pragma once

#include "AI/Brain.hpp"
#include "Element.hpp"
#include "biology/Genotype.hpp"
#include "biology/State.hpp"
#include "geometry/CircleSlice.hpp"

/*
 * A thinkable element of the world. Can explore the world, eat, drink, kill and mate.
 * Its the main element of the world - all the interactions are caused by an individual.
 */
class Individual: public Element
{
	public:
		static const float SIZE;

	private:
		Brain brain;
		Genotype genotype;
		State state;

	public:
		Individual();
		Individual(const Vector& position);
		Individual(const Individual& other);
		Individual(const Genotype& genotype);
		void updateWithDeltaTime(float deltaTimeInSeconds);

		void accept(ElementsVisitor& visitor);

		Brain& getBrain();
		State& getState();
		const State& getState() const;
		Genotype& getGenotype();
		const Genotype& getGenotype() const;

		const Vector& getLookDirection() const;
		CircleSlice getRadar() const;
};

